﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   
   <table>
   <tr align="left"><th> Choose the Agent</th><th>& Ending Date</th></tr>
   
   <tr align="left" ><td> <asp:DropDownList ID="ddAgent" runat="server"   AutoPostBack="true"
        onselectedindexchanged="ddAgent_SelectedIndexChanged">
    </asp:DropDownList></td><td>
        <asp:DropDownList ID="ddEdate" runat="server">
            <asp:ListItem></asp:ListItem>
            <asp:ListItem>06/25/2015</asp:ListItem>
            <asp:ListItem>07/01/2015</asp:ListItem>
        
        </asp:DropDownList>
      </td>  <td><asp:Button ID="btnGet" runat="server" Text="Get Details" 
               onclick="btnGet_Click" /></td></tr>
       
   <tr><td colspan="3">
       </td></tr>
   </table>
    
   <asp:GridView ID="gv" runat="server" CellPadding="4" 
           ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" 
           Width="769px" onrowcreated="gv_RowCreated" >
       <AlternatingRowStyle BackColor="White" />
           <Columns>
               <asp:BoundField DataField="PayeeName" HeaderText="Name" />
               <asp:BoundField DataField="Bank" HeaderText="Bank#" />
               <asp:BoundField DataField="Type" HeaderText="Type" />
              
               <asp:TemplateField HeaderText="Account Number">
                   <EditItemTemplate>
                       <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("AccountNumber") %>'></asp:TextBox>
                   </EditItemTemplate>
                   <ItemTemplate>
                       <asp:Label ID="Label1" runat="server" Text='<%# hideAccNo(Eval("AccountNumber").ToString()) %>'></asp:Label>
                   </ItemTemplate>
                   <ItemStyle HorizontalAlign="Right" />
               </asp:TemplateField>
              
               <asp:BoundField DataField="Amount" DataFormatString="{0:c}" 
                   HeaderText="Amount" />
               <asp:BoundField DataField="EndingDate" DataFormatString="{0:d}" 
                   HeaderText="Ending Date" />
           </Columns>
       <EditRowStyle BackColor="#7C6F57" />
           <EmptyDataTemplate>
               No Data Found for this Ending Date 
               <asp:Label ID="lblDate" runat="server" ></asp:Label>
           </EmptyDataTemplate>
       <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
       <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
       <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
       <RowStyle BackColor="#E3EAEB" />
       <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
       <SortedAscendingCellStyle BackColor="#F8FAFA" />
       <SortedAscendingHeaderStyle BackColor="#246B61" />
       <SortedDescendingCellStyle BackColor="#D4DFE1" />
       <SortedDescendingHeaderStyle BackColor="#15524A" />
    </asp:GridView>
   
   
  
</asp:Content>

